package com.ggs.mapper;

import com.ggs.DTO.UserDTO;
import com.ggs.pojo.User;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

@Mapper
public interface UserMapper {
//    @Insert("insert into user(username, password, create_time, update_time)"+
//            "values(#{username}, #{password}, now(), now())"
//    )
    public void register(@Param("username") String username,
                         @Param("password") String password);


//    @Select("select * from user where username = #{username}")
    public User findByName(String username);

    User login(String username, String password);

    void update(UserDTO userDTO);

    void updateAvatar(String avatarUrl,  String username);

    void updatePwd(String newPwd, String username);
}
